package be.sc.classicnetwork.controller.validator;

import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import org.hibernate.validator.ValidatorClass;

/**
 * Use for validations based on expression language.
 */
@Documented
@ValidatorClass(ExpressionValidator.class)
@Target( { ElementType.TYPE, ElementType.FIELD, ElementType.METHOD })
@Retention(RUNTIME)
public @interface Expression {

	/**
	 * The expression to validate against.
	 * 
	 * @return
	 */
	String assertTrue();

	String message() default "validator.expression";
}